<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>书店主页</title>
    <%@ include file="/common/head.jsp"%>
    <link rel="stylesheet" href="static/css/Style.css">
    <script>
        $(function () {
            <%
            request.setAttribute("OperatingUser","customer");
            %>
        })
    </script>
</head>
<body background="static/img/bookStore.jpg">
<%--为空则未登录，显示登陆注册链接--%>
<c:if test="${empty sessionScope.user}">
    <div align="right">
        <span style="background-color: cadetblue;width: 100%">
        <a href="pages/UserPages/login.jsp" style="color: chartreuse;text-decoration: none">登录</a>&nbsp
        <a href="pages/UserPages/register.jsp" style="color: aquamarine;text-decoration: none">注册</a>
        </span>
    </div>
</c:if>
<%--不为空则已登录，显示欢迎信息--%>
<c:if test="${not empty sessionScope.user}">
    <div class="TieleStyle">
        <font color="#f4a460" face="楷体" size="6">欢迎`${sessionScope.user.username}`光临c⭐书店</font>
        <table align="right">
            <th><a href="US?action=logout" style="text-decoration: none;color: red">注销</a></th>
        </table>
    </div>
</c:if>

<table border="1" align="center">
    <tr>
        <td class="frame"><img src="static/img/ke_huan.jpg" alt="图片加载失败" class="BooksShow"></td>
        <td class="frame"><img src="static/img/ke_xue.jpg" alt="图片加载失败" class="BooksShow"></td>
        <td class="frame"><img src="static/img/wuqi.jpg" alt="图片加载失败" class="BooksShow"></td>
        <td class="frame"><img src="static/img/gta5.jpg" alt="图片加载失败" class="BooksShow"></td>
        <td class="frame"><img src="static/img/wu_xia.jpg" alt="图片加载失败" class="BooksShow"></td>
        <td class="frame"><img src="static/img/shuai.jpg" alt="图片加载失败" class="BooksShow"></td>
    </tr>
    <tr>
        <td><a href="" class="TieleStyle">科幻类书籍</a></td>
        <td><a href="" class="TieleStyle">科教类数据</a></td>
        <td><a href="" class="TieleStyle">现代武器类书籍</a></td>
        <td><a href="common/relayJSP.jsp" class="TieleStyle">游戏写真</a></td>
        <td><a href="" class="TieleStyle">小说自传</a></td>
        <td><a href="" class="TieleStyle">经典阿衰漫画</a></td>
    </tr>
</table>
</body>
</html>